// 自动生成模板UserPluginPermission
package plugin_market

import (
	"gitcode.com/G-YT/ANN/server/global"
	"time"
)

// 用户插件权限管理 结构体  UserPluginPermission
type UserPluginPermission struct {
	global.GVA_MODEL
	UserId       *int       `json:"user_id" form:"user_id" gorm:"index;comment:用户ID;column:user_id;" binding:"required"`              //用户ID
	PluginId     *int       `json:"plugin_id" form:"plugin_id" gorm:"index;comment:插件ID;column:plugin_id;" binding:"required"`        //插件ID
	OrderId      *int       `json:"order_id" form:"order_id" gorm:"comment:订单ID;column:order_id;" binding:"required"`                 //订单ID
	Status       string     `json:"status" form:"status" gorm:"default:1;comment:权限状态;column:status;type:enum();" binding:"required"` //权限状态
	StartTime    *time.Time `json:"start_time" form:"start_time" gorm:"comment:开始时间;column:start_time;" binding:"required"`           //开始时间
	EndTime      *time.Time `json:"end_time" form:"end_time" gorm:"comment:结束时间;column:end_time;"`                                    //结束时间
	LastUsedTime *time.Time `json:"last_used_time" form:"last_used_time" gorm:"comment:最后使用时间;column:last_used_time;"`                //最后使用时间
	CreatedBy    uint       `gorm:"column:created_by;comment:创建者"`
	UpdatedBy    uint       `gorm:"column:updated_by;comment:更新者"`
	DeletedBy    uint       `gorm:"column:deleted_by;comment:删除者"`
}

// TableName 用户插件权限管理 UserPluginPermission自定义表名 user_plugin_permissions
func (UserPluginPermission) TableName() string {
	return "user_plugin_permissions"
}
